<template>
    <div id="myChart" :style="{width: '300px', height: '300px'}"></div>
</template>
<script>

export default {
  props:['weekTemplate'],
  data () {
    return {
      
    }
  },
  mounted(){
    this.drawLine();
  },
  methods: {
    drawLine(){
        // 基于准备好的dom，初始化echarts实例
        let myChart = this.$echarts.init(document.getElementById('myChart'))
        


        option.title.text = this.city+option.title.text
        option.xAxis.data = this.weekTemplate.day
        option.series[0].data = this.weekTemplate.temH
        option.series[1].data = this.weekTemplate.temL
        // 绘制图表
        myChart.setOption(option);
    }
  }
}



</script>